package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.MsUserPaperMapper;
import com.education.wisdom.pojo.MsUserPaper;
import com.education.wisdom.service.MsUserPaperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 用户试卷关联 服务层实现
 * 
 * @author ruoyi
 * @date 2018-12-20
 */
@Service
public class MsUserPaperServiceImpl implements MsUserPaperService
{
	@Autowired
	private MsUserPaperMapper userPaperMapper;

	/**
     * 查询用户试卷关联信息
     * 
     * @param userId 用户试卷关联ID
     * @return 用户试卷关联信息
     */
    @Override
	public MsUserPaper selectUserPaperById(Integer userId)
	{
	    return userPaperMapper.selectUserPaperById(userId);
	}
	
	/**
     * 查询用户试卷关联列表
     * 
     * @param userPaper 用户试卷关联信息
     * @return 用户试卷关联集合
     */
	@Override
	public List<MsUserPaper> selectUserPaperList(MsUserPaper userPaper)
	{
	    return userPaperMapper.selectUserPaperList(userPaper);
	}
	
    /**
     * 新增用户试卷关联
     * 
     * @param userPaper 用户试卷关联信息
     * @return 结果
     */
	@Override
	public int insertUserPaper(MsUserPaper userPaper)
	{
	    return userPaperMapper.insertUserPaper(userPaper);
	}
	
	/**
     * 修改用户试卷关联
     * 
     * @param userPaper 用户试卷关联信息
     * @return 结果
     */
	@Override
	public int updateUserPaper(MsUserPaper userPaper)
	{
	    return userPaperMapper.updateUserPaper(userPaper);
	}

	/**
     * 删除用户试卷关联对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteUserPaperByIds(String ids)
	{
		return userPaperMapper.deleteUserPaperByIds(Convert.toStrArray(ids));
	}

	@Override
	public List<MsUserPaper> selectStuUserPaperList(Map<String, Object> map) {
		return userPaperMapper.selectStuUserPaperList(map);
	}

}
